package com.hmy.contract.commons.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author seven.qi 齐胜南
 * @version 1.0
 * @description
 * @date 2023/12/25 10:27
 */
@Getter
@AllArgsConstructor
public enum ContractActorTypeEnum {

    PERSON("person", "个人"),

    CORP("corp", "企业");

    private final String type;

    private final String typeDesc;

    public static String getDescByType(String type) {
        for (ContractActorTypeEnum contractTypeEnum : ContractActorTypeEnum.values()) {
            if (type.equalsIgnoreCase(contractTypeEnum.getType())) {
                return contractTypeEnum.getTypeDesc();
            }
        }
        return null;
    }
}
